package cn.com.lyb;

import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;

import java.io.File;

public class Orc {
    public static void main(String[] args) {
        File imageFile = new File("C:\\Users\\85438\\Desktop\\biwang.jpg");
        Tesseract tesseract = new Tesseract();
        tesseract.setLanguage("eng");
        try {
            String result = tesseract.doOCR(imageFile);
            System.out.println(result);
        } catch (TesseractException e) {
            System.err.println(e.getMessage());
        }

    }
}
